<?php
$this->Paginator->options(array(
    'update' => '#content_main',
    'evalScripts' => true
));
?>  
<table width="100%" border="1">
    <tr> 
        <th><?php echo $this->Paginator->sort('Attribute', 'attribute'); ?></th>
    </tr>
    <tr>
        <td width="20%">
            <table width="100%">
                <?php
                $n = 0;
                foreach ($attributes as $value):
                    if ($n%2 == 0) {
                        echo "</table></td><td width='20%' ><table width='100%'>";
                    }
                    ?>
                    <tr><td><?php echo $value['Attribute']['attribute']; ?></td></tr>
                <?php $n++;
                endforeach; ?>
                <?php if ($n == '4') {
                echo "</table></td>";
                } ?>    
            </table>
        </td>
    </tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr align="right">
        <td colspan="5">
            <?php echo $this->Paginator->numbers();
                echo $this->Js->writeBuffer();
            ?>
        </td>
    </tr>
</table>
<?php
echo $this->Form->create('Attribute',array('action'=>'admin_index'));


?>
<div style="width: 100%; margin:40px 0px 40px 0px;"></div>
<table>
    <tr>
        <td>
          Add comma separated attribute values to add more Attribute.
        </td>
    </tr>
    <tr>
        <td>
          <?php  echo $this->Form->input('attribute',array('type'=>'textarea','cols'=>'90','rows'=>'8','label'=>''));?>
        </td>
    </tr>
    <tr>
        <td>
    <?php echo $this->Form->end('Add'); ?>      
        </td>
    </tr>
</table>